package indi.entity;

public class Book extends Title {
    //可借天数:7
    private int days;

    public int getDays() {
        return days;
    }

    public Book(String ISBN, String author, int totalNum, 
    		String bookName, float price, String type, 
    		int days) {
        super(ISBN, author, totalNum, bookName, price, type);
        this.days = days;
    }
    // 复制构造
    public Book(Book otherBook) {
		super(otherBook.getISBN(), otherBook.getAuthor(), 
				otherBook.getTotalNum(), otherBook.getBookName(), 
				otherBook.getPrice(), otherBook.getType());
		this.days = otherBook.getDays();
	}

	public void setDays(int newDays) {
    	this.days = newDays;
    }

	public void setAll(Book otherBook) {
		this.setISBN(otherBook.getISBN());
		this.setAuthor(otherBook.getAuthor());
		this.setTotalNum(otherBook.getTotalNum());
		this.setBookName(otherBook.getBookName());
		this.setPrice(otherBook.getPrice());
		this.setType(otherBook.getType());
		this.days = otherBook.getDays();
	}
    
    
}
